﻿/*
 * @Autor: PK
 * @Date: 2020-12-24 10:08:47
 * @Description: Customer基类，所有顾客类型的基类
 */

using System;
using System.Collections.Generic;
using NLog;
using ShkSimulation.core.template.agency;
using ShkSimulation.core.template.model;

namespace ShkSimulation.core.template.customer {
    public abstract class Customer {
        
        protected static readonly Logger Logger = LogManager.GetLogger(nameof(Customer));
        
        public int BeforeArriveInternalAgencyIndex { get; internal set; }
        public int BeforeServeInternalAgencyIndex { get; internal set; }
        public int BeforeDepartInternalAgencyIndex { get; internal set; }
        public int Id { get; set; }
        public string Identify { get; set; }
        public Dictionary<string, object> Attributes { get; set; }

        public virtual void Dispose(){
            Logger.Info("Customer {Id} Destroyed", this.Id);
        }

        public abstract IReadOnlyList<Agency> GetAgencies();
                
        // 查看下一个服务机构，没有返回null
        public abstract Agency PeekNextAgency();

        // 进入下一个服务机构
        public abstract void EnterNextAgency();
        
        public abstract void SkipAgency(int count);
        
        public abstract void ExistNetwok();

    }
}
